#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QTimer>
#include <QTime>
#include <QMediaPlayer>

namespace Ui {
class Widget;
}

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = nullptr);
    ~Widget();

    QString formatTime(int ms);

private slots:
    void on_pushButton_clicked();
    void flushTime();

private:
    int seconds;
    QTime startTime;
    QTimer* timer;
	QMediaPlayer* player;
    Ui::Widget *ui;
};

#endif // WIDGET_H
